import request from '@/config/axios'

export interface PackageInfoVO {
  id: number
  no: string
  name: string
  productType: number
  merchantId: number
  address: string
  supplyPrice: string
  platformPrice: string
  productIntroduct: string
  status: number
}

// 查询相亲活动信息列表
export const getPackageInfoPage = async (params) => {
  return await request.get({ url: `/activity/package-info/page`, params })
}

// 获得相亲套餐类型列表
export const getPackageInfoList = async (ids: number) => {
  return await request.get({ url: `/activity/package-info/list?ids=` + ids })
}

// 获得相亲套餐类型列表
export const getPackageInfoListAll = async () => {
  return await request.get({ url: `/activity/package-info/getMerchantTypeList` })
}

// 查询相亲活动信息详情
export const getPackageInfo = async (id: number) => {
  return await request.get({ url: `/activity/package-info/get?id=` + id })
}

// 新增相亲活动信息
export const createPackageInfo = async (data: PackageInfoVO) => {
  return await request.post({ url: `/activity/package-info/create`, data })
}

// 修改相亲活动信息
export const updatePackageInfo = async (data: PackageInfoVO) => {
  return await request.put({ url: `/activity/package-info/update`, data })
}

// 删除相亲活动信息
export const deletePackageInfo = async (id: number) => {
  return await request.delete({ url: `/activity/package-info/delete?id=` + id })
}

// 导出相亲活动信息 Excel
export const exportPackageInfo = async (params) => {
  return await request.download({ url: `/activity/package-info/export-excel`, params })
}

// 新增套餐商品
export const createPackageGoods = async (data: PackageInfoVO) => {
  return await request.post({ url: `/activity/package-product/create`, data })
}
